home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #2 / Amiga Plus CD - 2004 - No. 02.iso / AmigaPlus / Tools / Development / RxMUI / Examples / CY.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  2004-01-31  |  1.5 KB  |  55 lines

  1. /* CompactWindow example */
  2.  
  3. signal on halt
  4. signal on break_c
  5.  
  6. l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
  7. if AddLibrary("rexxsupport.library","rxmui.library")~=0 then exit
  8. call RxMUIOpt("DebugMode ShowErr")
  9.  
  10. call createApp
  11. call handleApp
  12.  
  13. /* never reached */
  14. /***********************************************************************/
  15. handleApp: procedure
  16.     ctrl_c=2**12
  17.     do forever
  18.         call NewHandle("APP","H",ctrl_c)
  19.         if and(h.signals,ctrl_c)>0 then exit
  20.         if h.event="QUIT" then exit
  21.         else interpret h.event
  22.     end
  23.     /* never reached */
  24. /***********************************************************************/
  25. createApp: procedure
  26.  
  27.     app.Title="CompactWindow"
  28.     app.Version="$VER: CompactWindow 2.1 (25.1.2002)"
  29.     app.Copyright="Copyright © 2002 by Alfonso Ranieri"
  30.     app.Author="Alfonso Ranieri"
  31.     app.Description="CompactWindow example"
  32.     app.Base="RXMUIEXAMPLE"
  33.     app.SubWindow="WIN"
  34.      win.Class="CompactWindow"
  35.      win.ID="MAIN"
  36.      win.Title="CompactWindow Example"
  37.      win.noGadgets=1
  38.      win.SizeGadget=0
  39.      win.Contents="mgroup"
  40.       mgroup.0="cy"
  41.        cy.class="Cycle"
  42.        cy.entries="One|Two|Three"
  43.     if NewObj("Application","app")>0 then exit
  44.  
  45.     call Notify("win","CloseRequest",1,"app","ReturnID","QUIT")
  46.  
  47.     call set("win","open",1)
  48.  
  49.     return
  50. /***********************************************************************/
  51. halt:
  52. break_c:
  53.     exit
  54. /**************************************************************************/
  55.